import 'package:flutterlib/model/navigate/ActivityCity.dart';
import 'package:flutterlib/model/navigate/ActivityType.dart';
import 'package:flutterlib/model/navigate/Bb.dart';
import 'package:flutterlib/model/navigate/ChainBar.dart';
import 'package:flutterlib/model/navigate/Chainnode.dart';
import 'package:flutterlib/model/navigate/Coin.dart';
import 'package:flutterlib/model/navigate/Exchange.dart';
import 'package:flutterlib/model/navigate/New.dart';
import 'package:flutterlib/model/navigate/Newslastest.dart';
import 'package:flutterlib/model/navigate/Weibo.dart';

class MainTabPOJO {
    List<ActivityCity> activity_city;
    List<ActivityType> activity_type;
    List<Bb> bbs;
    List<ChainBar> chain_bar;
    List<Chainnode> chainnode;
    List<Coin> coins;
    List<Exchange> exchanges;
    List<New> news;
    List<Newslastest> newslastest;
    List<Weibo> weibo;

    MainTabPOJO({this.activity_city, this.activity_type, this.bbs, this.chain_bar, this.chainnode, this.coins, this.exchanges, this.news, this.newslastest, this.weibo});

    factory MainTabPOJO.fromJson(Map<String, dynamic> json) {
        return MainTabPOJO(
            activity_city: json['activity_city'] != null ? (json['activity_city'] as List).map((i) => ActivityCity.fromJson(i)).toList() : null, 
            activity_type: json['activity_type'] != null ? (json['activity_type'] as List).map((i) => ActivityType.fromJson(i)).toList() : null, 
            bbs: json['bbs'] != null ? (json['bbs'] as List).map((i) => Bb.fromJson(i)).toList() : null, 
            chain_bar: json['chain_bar'] != null ? (json['chain_bar'] as List).map((i) => ChainBar.fromJson(i)).toList() : null, 
            chainnode: json['chainnode'] != null ? (json['chainnode'] as List).map((i) => Chainnode.fromJson(i)).toList() : null, 
            coins: json['coins'] != null ? (json['coins'] as List).map((i) => Coin.fromJson(i)).toList() : null, 
            exchanges: json['exchanges'] != null ? (json['exchanges'] as List).map((i) => Exchange.fromJson(i)).toList() : null, 
            news: json['news'] != null ? (json['news'] as List).map((i) => New.fromJson(i)).toList() : null, 
            newslastest: json['newslastest'] != null ? (json['newslastest'] as List).map((i) => Newslastest.fromJson(i)).toList() : null, 
            weibo: json['weibo'] != null ? (json['weibo'] as List).map((i) => Weibo.fromJson(i)).toList() : null, 
        );
    }

    Map<String, dynamic> toJson() {
        final Map<String, dynamic> data = new Map<String, dynamic>();
        if (this.activity_city != null) {
            data['activity_city'] = this.activity_city.map((v) => v.toJson()).toList();
        }
        if (this.activity_type != null) {
            data['activity_type'] = this.activity_type.map((v) => v.toJson()).toList();
        }
        if (this.bbs != null) {
            data['bbs'] = this.bbs.map((v) => v.toJson()).toList();
        }
        if (this.chain_bar != null) {
            data['chain_bar'] = this.chain_bar.map((v) => v.toJson()).toList();
        }
        if (this.chainnode != null) {
            data['chainnode'] = this.chainnode.map((v) => v.toJson()).toList();
        }
        if (this.coins != null) {
            data['coins'] = this.coins.map((v) => v.toJson()).toList();
        }
        if (this.exchanges != null) {
            data['exchanges'] = this.exchanges.map((v) => v.toJson()).toList();
        }
        if (this.news != null) {
            data['news'] = this.news.map((v) => v.toJson()).toList();
        }
        if (this.newslastest != null) {
            data['newslastest'] = this.newslastest.map((v) => v.toJson()).toList();
        }
        if (this.weibo != null) {
            data['weibo'] = this.weibo.map((v) => v.toJson()).toList();
        }
        return data;
    }
}